home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_tem_tiki1cut.cog < prev    next >
Text File  |  1999-11-15  |  4KB  |  133 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEM_Tiki1Door.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message     startup
  13.     message     crossed
  14.     
  15.     thing       player              local
  16.     thing       indy                local
  17.     thing       interpFocus         local
  18.     
  19.     thing       interpCam
  20.     thing       targ_Look
  21.     thing       targ_Walk
  22.     thing       focusMoveTarg       # interpFocus moves to this
  23.     
  24.     surface     crossThis 
  25.     
  26.     sound       stubby=tm03j01.wav      local   # ...stubby little arms.
  27.     sound       upThere=INXJ003.wav     local   # something's in there.
  28.     
  29.     template    tpl_Ghost=ghost             local
  30.     template    tplActor=indy_sh_actor      local
  31.     
  32.     cog         boulder
  33.     
  34.     vector      playerPos           local
  35.     
  36.     int         curCam              local
  37.     int         animId              local
  38.     int         done=0              local
  39.     
  40. end
  41.  
  42. # ========================================================================================
  43.  
  44. code
  45.  
  46. startup:
  47.  
  48.     player = GetLocalPlayerThing();
  49.     return;
  50.  
  51. # ========================================================================================
  52.  
  53. crossed:
  54.  
  55.     if(done == 0)
  56.     {
  57.         done = 1;
  58.         
  59.         # disable and stop player.
  60.         SetActorFlags(player, 0x200000);
  61.         
  62.         indy = CreateThing(tplActor, player);
  63.         CaptureThing(indy);
  64.         AISetCutsceneMode(indy);
  65.         CopyPlayerHolsters(player, indy);
  66.         SetThingFlags(player, 0x80000);
  67.         ClearThingFlags(indy, 0x80000);
  68.         
  69.         # offset camera to thing.
  70.         #SetExtCamLookOffsetToThing(player);
  71.         SetExtCamOffsetToThing(interpCam);
  72.         
  73.         # create target for secondary focus at player position.
  74.         playerPos = VectorAdd(VectorTransformToOrient(player, '0.0 0.0 0.0'), GetThingPos(player));
  75.         interpFocus = CreateThingAtPos(tpl_Ghost, GetThingSector(player), playerPos, '0 0 0');
  76.         CaptureThing(interpFocus);
  77.         
  78.         SetCameraFocus(2, interpCam);
  79.         SetCameraSecondaryFocus(2, interpFocus);
  80.         SetCurrentCamera(2);
  81.         SetCameraFOV(90, 0, 0.0);
  82.         
  83.         #Sleep(1.0);
  84.         
  85.         animId = MoveThingToPos(interpFocus, GetThingPos(targ_Walk), 5.0);
  86.         
  87.         # walk player to Tiki
  88.         AISetMoveSpeed(indy, 1.0);
  89.         AiSetLookThing(indy, targ_Look);
  90.         AiSetMoveThing(indy, targ_Walk, 1);
  91.         #ResetThing(indy);
  92.         
  93.         #AIWaitForStop(player);
  94.         
  95.         MoveToFrame(interpCam, 1, 1.0);
  96.         
  97.         Sleep(1.0);
  98.         PlayVoice(player, stubby, 1.0, 0);
  99.         
  100.         Sleep(2.0);
  101.         MoveToFrame(interpCam, 2, 2.0);
  102.         
  103.         #Sleep(2.0);
  104.         MoveToFrame(interpCam, 3, 1.0);
  105.         
  106.         #Sleep(4.0);
  107.         animId = MoveThingToPos(interpFocus, GetThingPos(focusMoveTarg), 4.0);
  108.         #MoveToFrame(interpCam, 4, 1.0);
  109.         
  110.         Sleep(2.0);
  111.         PlayVoice(player, upThere, 1.0, 1);
  112.         
  113.         Sleep(1.0);
  114.         
  115.         ClearActorFlags(player, 0x200000);
  116.         SetThingFlags(indy, 0x80000);
  117.         ClearThingFlags(player, 0x80000);
  118.         
  119.         SetCameraPosition(1, GetThingPos(interpCam));
  120.         SetCurrentCamera(1);
  121.         RestoreExtCam();
  122.         
  123.         SendMessage(boulder, user0);
  124.     }
  125.     
  126.     return;
  127.  
  128.  
  129. # ========================================================================================
  130.  
  131. end
  132.  
  133.